var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var nodemon = require('gulp-nodemon');

gulp.task("node", function() {
    nodemon({
        script: './app.js',
        ext: 'js html',
        env: {
            'NODE_ENV': 'development'
        }
    }).on('start', function() {
        browserSync.init({
            proxy: 'http://localhost:8081',
            files: ["public/**", "views/**", "routes/**"],
            port:8080
        }, function() {
            console.log("browser refreshed.");
        });
    });
});




gulp.task('default', gulp.series('node'));